#! /bin/bash

DOCKER_REPO=$1

rm -rf _out

rm -rf cmd/virt-freezer/virt-freezer
rm -rf cmd/virt-probe/virt-probe

rm -rf build_sw64/dockerbuild/virt-api/virt-api

rm -rf build_sw64/dockerbuild/virt-operator/virt-operator
rm -rf build_sw64/dockerbuild/virt-operator/csv-generator

rm -rf build_sw64/dockerbuild/virt-controller/virt-controller

rm -rf build_sw64/dockerbuild/virt-handler/virt-handler
rm -rf build_sw64/dockerbuild/virt-handler/virt-chroot
rm -rf build_sw64/dockerbuild/virt-handler/container-disk

rm -rf build_sw64/dockerbuild/virt-launcher/virt-handler
rm -rf build_sw64/dockerbuild/virt-launcher/virt-freezer
rm -rf build_sw64/dockerbuild/virt-launcher/virt-probe
rm -rf build_sw64/dockerbuild/virt-launcher/container-disk

docker rmi ${DOCKER_REPO}/kubevirt/virt-api:0.48.1-1040
docker rmi ${DOCKER_REPO}/kubevirt/virt-operator:0.48.1-1040
docker rmi ${DOCKER_REPO}/kubevirt/virt-handler:0.48.1-1040
docker rmi ${DOCKER_REPO}/kubevirt/virt-controller:0.48.1-1040
docker rmi ${DOCKER_REPO}/kubevirt/virt-launcher:0.48.1-1040